package com.mt.mtbusinessmanagementsystem.pojo.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.mt.mtbusinessmanagementsystem.pojo.entity.ProductsClassification;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;

@Builder
@Repository
@Data
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class ProductsClassificationDTO {
    private Integer productsClassificationId;
    private Integer firstClassificationId;
    private String firstClassificationName;
    private Integer secondClassificationId;
    private String secondClassificationName;
    private Integer thirdClassificationId;
    private String thirdClassificationName;
    private Integer fourthLevelClassificationId;
    private String fourthLevelClassificationName;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime date;
    private String employeeId;
    private Boolean isFirstExist;
    private Boolean isSecondExist;
    private Boolean isThirdExist;
    private Boolean isFourthExist;
    private Integer levelNumber;

    public ProductsClassificationDTO(){
        this.isFirstExist = false;
        this.isSecondExist = false;
        this.isThirdExist = false;
        this.isFourthExist = false;
    }

    public ProductsClassificationDTO(Integer productsClassificationId, Integer firstClassificationId, String firstClassificationName, Integer secondClassificationId, String secondClassificationName, Integer thirdClassificationId, String thirdClassificationName, Integer fourthLevelClassificationId, String fourthLevelClassificationName, LocalDateTime date, String employeeId, Boolean isFirstExist, Boolean isSecondExist, Boolean isThirdExist, Boolean isFourthExist,Integer levelNumber) {
        this.productsClassificationId = productsClassificationId;
        this.firstClassificationId = firstClassificationId;
        this.firstClassificationName = firstClassificationName;
        this.secondClassificationId = secondClassificationId;
        this.secondClassificationName = secondClassificationName;
        this.thirdClassificationId = thirdClassificationId;
        this.thirdClassificationName = thirdClassificationName;
        this.fourthLevelClassificationId = fourthLevelClassificationId;
        this.fourthLevelClassificationName = fourthLevelClassificationName;
        this.date = date;
        this.employeeId = employeeId;
        this.isFirstExist = false;
        this.isSecondExist = false;
        this.isThirdExist = false;
        this.isFourthExist = false;
        this.levelNumber=levelNumber;
    }
}
